package com.usc.csci588.chaltrojan.login;

import com.usc.csci588.chaltrojan.R;
import com.usc.csci588.chaltrojan.SetDestinationMapActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.Toast;

public class WelcomeScreenActivity extends Activity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.welcome_screen_layout);
		ImageButton LoginButton = (ImageButton) findViewById(R.id.login_button_twitter);
		LoginButton.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				// TODO Auto-generated method stub
				Log.d("ChalTrojaMain", "Twitter Button Clicked.");				
				Intent i = new Intent(getApplicationContext(),TwitterLoginActivity.class);	            
		        startActivity(i);
			}

		});

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.welcome_screen_layout, menu);
		return true;
	}

/*	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		// this should have the same data you passed
		Bundle extras = data.getExtras();
		double[] ll = extras.getDoubleArray("Lat_Long");

		Double lat = ll[0];
		Double lon = ll[1];

		if (resultCode == SetDestinationMapActivity.DEST_FINAL
				&& requestCode == SetDestinationMapActivity.DEST_FINAL) {
			Toast.makeText(
					getBaseContext(),
					"You'll be going to " + lat.toString() + "N "
							+ lon.toString() + " W", Toast.LENGTH_LONG).show();
		}

	}
*/
}
